/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: VP Development
 * License Type: Purchased
 */
using System;
using System.Collections;
using Orm.Criteria;
using Orm;
using NHibernate;

namespace petshop {
	public class PetCriteria : AbstractORMCriteria {
		private Int32Expression _id;
		public Int32Expression Id {
			get {
				return  _id;
			}
			
		}
		
		private DateTimeExpression _injection;
		public DateTimeExpression Injection {
			get {
				return  _injection;
			}
			
		}
		
		private StringExpression _source;
		public StringExpression Source {
			get {
				return  _source;
			}
			
		}
		
		private StringExpression _type;
		public StringExpression Type {
			get {
				return  _type;
			}
			
		}
		
		public PetCriteria(ICriteria criteria) : base(criteria) {
			_id =  new Int32Expression("Id", this);
			_injection =  new DateTimeExpression("Injection", this);
			_source =  new StringExpression("Source", this);
			_type =  new StringExpression("Type", this);
		}
		
		public PetCriteria(PersistentSession session) : this(session.CreateCriteria(typeof(Pet))) {
		}
		
		public PetCriteria() : this(global::petshop.PetShopPersistentManager.Instance().GetSession()) {
		}
		
		public Pet UniquePet() {
			return (Pet)base.UniqueResult();
		}
		
		public Pet[] ListPet() {
			IList lList = base.List();
			Pet[] lValues = new Pet[lList.Count];
			lList.CopyTo(lValues, 0);
			return lValues;
		}
		
	}
	
}

